package com.atgugui.edumsm.controller;

import com.atgugui.commonutils.Result;
import com.atgugui.commonutils.ResultCode;
import com.atgugui.edumsm.service.MsmService;
import com.atgugui.servicebase.exceptionhandler.GuLiException;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.tencentcloudapi.common.Credential;
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
import com.tencentcloudapi.common.profile.ClientProfile;
import com.tencentcloudapi.common.profile.HttpProfile;
import com.tencentcloudapi.ic.v20190307.models.SendSmsRequest;
import com.tencentcloudapi.sms.v20190711.SmsClient;
import com.tencentcloudapi.sms.v20190711.models.SendSmsResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@Api(tags = "用户注册验证控制层")
@RestController
@CrossOrigin
@RequestMapping("/edumsm/msg-check")
public class MsmController {
    @Autowired
    private MsmService msmService;


    @ApiOperation(value = "邮箱注册验证")
    @GetMapping("/sendCheckMail/{email}")
    public Result sendCheckMail(@PathVariable String email) {
        boolean isSuccess = msmService.sendCheckMail(email);
        return isSuccess ? Result.ok() : Result.error();
    }
}
